package com.qc.qcgl807;
//汽车类的货车
public class Bus extends QiChe {
  //属性    座位数
	 private int cheWei;
	
	public Bus() {
	}
	public Bus(String pinPai, String chePai, int riJia,int cheWei) {
		super(pinPai, chePai, riJia);
		this.cheWei = cheWei;	
	}
	public int getCheWei() {
		return cheWei;
	}
	public void setCheWei(int cheWei) {
		this.cheWei = cheWei;
	}
	//方法  求租金
	public double tota(int day) {
		double zTota = day*this.getRiJia();
		if(day>=3&&day<7){
			zTota *=0.9;
		}else if(day>=7&&day<=30){
			zTota *=0.8;
		}else if(day>=30&&day<150){
			zTota *=0.7;
		}else if(day>=150){
			zTota *=0.6;
		}
		return zTota;
	}

}
